﻿@model EditLayoutViewModel
@{
	ViewBag.Title = String.IsNullOrEmpty(Model.PageLayout.Id) ? "New page layout" : "Edit page layout";
}
<h2>@ViewBag.Title</h2>
@using (Html.BeginForm()) {
	@Html.AntiForgeryToken()
	@Html.HiddenFor(m => m.PageLayout.Id)
	<fieldset>
		<div>				
			@Html.LabelFor(m => m.PageLayout.Name, "Name")
			@Html.TextBoxFor(m => m.PageLayout.Name, new { @class = "te fe-wide" })
			@Html.ValidationMessageFor(m => m.PageLayout.Name)
		</div>
		<div>
			@Html.LabelFor(m => m.PageLayout.PageType, "Page type")
			@Html.DropDownListFor(m => m.PageLayout.PageType, new SelectList(Model.PageTypes, "Id", "DisplayName", Model.PageLayout.PageType), new { @class="te fe-middle" })
			@Html.ValidationMessageFor(m => m.PageLayout.PageType)
		</div>
		<div>
			@Html.LabelFor(m => m.PageLayout.Theme, "Theme")
			@Html.EditorFor(m => m.PageLayout.Theme, "ThemeChooser", new { ThemesListUrl = Url.Action("InstalledThemesWithInheritOption", "Themes") })
			@Html.ValidationMessageFor(m => m.PageLayout.Theme)
		</div>
	</fieldset>
	<p>
		<input type="submit" value="Save" /> or @Html.ActionLink("Cancel", "Index")
	</p>
}
